home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / dbase / db3ut10u.zip / EGREP3.DOC < prev    next >
Text File  |  1991-10-12  |  3KB  |  96 lines

  1. NAME
  2.     egrep3 - egrep into dBase III files v1.0a, may 1991.
  3.  
  4.  
  5. SYNOPSIS
  6.     egrep3 [-ivclh] [-F c] regex file [files...]
  7.  
  8.  
  9. DESCRIPTION
  10.     `egrep3' searches into `files' (in dBase III format) for records
  11.     containing the `regex' pattern and prints them on stdout. `regex' is
  12.     an extended regular expression (see below).
  13.  
  14.     Output is in the form:
  15.  
  16.          file(n)= field1:field2: ... :fieldN
  17.  
  18.     where `n' specifies the record number where match occurred.
  19.     If "-F c" option is specified then "c" is taken as the output field
  20.     separator (OFS) instead of ":".
  21.  
  22.  
  23. REGULAR EXPRESSIONS
  24.     c           a single (non-meta) character matches itself.
  25.     .           matches any single character except newline.
  26.     ?           postfix operator; preceeding item is optional.
  27.     *           postfix operator; preceeding item 0 or more times.
  28.     +           postfix operator; preceeding item 1 or more times.
  29.     |           infix operator; matches either argument.
  30.     ^           matches the empty string at the beginning of a field.
  31.     $           matches the empty string at the end of a field.
  32.     \<          matches the empty string at the beginning of a word.
  33.     \>          matches the empty string at the end of a word.
  34.     [chars]     match any character in the given class; if the first
  35.                 character after [ is ^, match any character not in the
  36.                 given class; a range of characters may be specified by
  37.                 first-last; for example, [A-F0-2] is equivalent to the
  38.                 class [ABCDEF012].
  39.     ( )         parentheses are used to override operator precedence.
  40.     \digit      \n matches a repeat of the text matched earlier in the
  41.                 regexp by the subexpression inside the nth opening
  42.                 parenthesis.
  43.     \           any special character may be preceded by a backslash to
  44.                 match it literally.
  45.  
  46.     Operator precedence is (highest to lowest) ?, *, and +,
  47.     concatenation, and finally |.  All other constructs are
  48.     syntactically identical to normal characters.
  49.  
  50.  
  51. COMMAND LINE OPTIONS
  52.     -i      ignore case
  53.     -v      print only lines that do not match `regex'
  54.     -c      print only a count of lines matched for each file
  55.     -l      print only names of files that have matches
  56.     -F c    use character "c" as output field separator
  57.     -h      help
  58.  
  59.  
  60. EXIT STATUS
  61.     0       at least a match has been found in any of the files
  62.             specified
  63.     1       usage error
  64.     2       no match has been found
  65.     3       no match found and errors opening one or more files
  66.     4       unknown command line option
  67.  
  68.  
  69. EXAMPLES
  70.     search for "word1" or "word2":
  71.         egrep3 "\<word1\>|\<word2\>" words.dbf
  72.  
  73.     search for C style identifiers:
  74.         egrep3 "[a-zA-Z][a-zA-Z0-9]*" variabls.dbf
  75.  
  76.     search for "[male]" or "[female]" alone in a field (ignore case):
  77.         egrep3 -i "^\[(male|female)\]$" persons.dbf
  78.  
  79.  
  80. SEE ALSO
  81.     count3, fgrep3, pack3, stru3, zap3.
  82.  
  83.  
  84. AUTHORS
  85.     Legovich Danilo.
  86.  
  87.  
  88. COPYRIGHT
  89.     This program is a part of a shareware product. You may register
  90.     using the order form (file "ORDER.TXT") provided with the package.
  91.     For any suggestion or problem contact the author at this e-mail
  92.     address:
  93.  
  94.         dany@alessia.dei.unipd.it
  95.  
  96.